package com.yy.ttmodule.udp;

public class UdpCommand {

    /**
     * 数据包的包头
     */
    public final static byte[] PACK_FRAME_HEADER = new byte[]{(byte) 0xAA, 0x60, (byte) 0xAA, 0x60};

    /**
     * 数据包包头长度
     */
    public final static int RECEIVE_PACK_HEAD_LEN = 4;

    /**
     * 数据包帧类型长度
     */
    public final static int RECEIVE_PACK_PARAM_LEN = 2;

    /**
     * 数据包帧长度长
     */
    public final static int RECEIVE_PACK_FRAME_BYTE_LEN = 2;

    /**
     * 数据包包尾长
     */
    public final static int RECEIVE_PACK_END_LEN = 1;

    /**
     * 数据包包头+帧类型+帧长度 的长度
     */
    public final static int RECEIVE_FRAME_LEN_POS = RECEIVE_PACK_HEAD_LEN
            + RECEIVE_PACK_PARAM_LEN + RECEIVE_PACK_FRAME_BYTE_LEN;

    /**
     * 数据包除了帧的长度
     */
    public final static int RECEIVE_PACK_EXC_FRAME_LEN = RECEIVE_PACK_HEAD_LEN
            + RECEIVE_PACK_PARAM_LEN + RECEIVE_PACK_FRAME_BYTE_LEN + RECEIVE_PACK_END_LEN;

    /**
     * 数据包最大长度限定
     */
    public final static int RECEIVE_PACK_LEN_MAX = 1024;

}
